{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Binned Scatterplot\n",
    "------------------\n",
    "This example shows how to make a binned scatterplot.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "import altair as alt\n",
    "alt.data_transformers.enable('json')\n",
    "from vega_datasets import data\n",
    "\n",
    "source = data.movies.url\n",
    "\n",
    "alt.Chart(source).mark_circle().encode(\n",
    "    alt.X('IMDB_Rating:Q', bin=True),\n",
    "    alt.Y('Rotten_Tomatoes_Rating:Q', bin=True),\n",
    "    size='count()'\n",
    ")\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "env": {},
   "interrupt_mode": "signal",
   "language": "python",
   "metadata": {},
   "name": "python3"
  },
  "language": "python"
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
